% 1D wavelet analysis ...
%
% G. Charria 2008 based on 
% C. Torrence (January 1998)
% (See "http://paos.colorado.edu/research/wavelets/")
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

% NB: 'units' on the plot = units of your xaxis (days, hours, km, ... )

clear all
close all
tic

x=1:0.1:100; % Time serie = hours for example
vec=sin(2*pi/6.*x); % Data

%cd ./wavelet
[wave,period,scale,coi,power,sig95,err,global_ws,global_signif,dj,dt]=wavelet1D(x,vec);

%cd ../fig_wav
kind=1; % SLA
LocalWaveletPowerSpectrum_tps(wave,period,scale,coi,power,sig95,global_ws,...
    global_signif,vec,x,0)
cd ..

toc